package com.breeze.breezelive.play;

import android.view.Surface;

public class LivePlayer {
    private VideoPlayerThread mVideoThread;
    private AudioPlayerThread mAudioThread;

    public LivePlayer(String path) {
        mVideoThread = new VideoPlayerThread(path);
        mAudioThread = new AudioPlayerThread(path);
    }

    public void setVideoSize(int mWidth, int mHeight) {
        mVideoThread.setVideoSize(mWidth, mHeight);
    }

    public void setSurface(Surface surface) {
        mVideoThread.setSurface(surface);
    }

    public void start() {
        mVideoThread.prepare();
        mAudioThread.prepare();
        mVideoThread.start();
        mAudioThread.start();
    }
}